﻿namespace Reactor.Messaging.Attributes
{
    /// <summary>
    /// Attribute used to mark a MessageHandler for handling messages on the pub/sub channel specified in this attribute. 
    /// </summary>
    public class PubSubChannelAttribute : DestinationInformationAttribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PubSubChannelAttribute"/> class.
        /// </summary>
        public PubSubChannelAttribute()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PubSubChannelAttribute"/> class.
        /// </summary>
        /// <param name="topicName">Name of the topic.</param>
        public PubSubChannelAttribute(string topicName)
        {
            TopicName = topicName;
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string TopicName { get; set; }
    }
}
